import com.sun.org.apache.xml.internal.utils.res.IntArrayWrapper;
import javafx.scene.shape.ClosePathBuilder;

public class Test2 {
    public static void main(String[] args) {
        MyArray<Integer> array = new MyArray<Integer>();
        array.setArray(0,12);
        array.setArray(1,1212);
        int b = array.getArray(0);
        int a = array.getArray(1);
        System.out.println(a);
        System.out.println(b);
        MyArray<Character> array1 = new MyArray<Character>();
        array1.setArray(0,'a');
        array1.setArray(1,'b');
        char ch1 = array1.getArray(0);
        char ch2 = array1.getArray(1);
        System.out.println(ch1);
        System.out.println(ch2);
    }
}
class MyArray<T> {
    public Object[] array = new Object[10];
    public T getArray(int pos) {
        return (T)array[pos];
    }
    public void setArray(int pos,T val) {
        array[pos] = val;
    }
}
